# -*- coding: UTF-8 -*-
"""
@Filename:exerc2.py
@author:Cora
@time:2025-03-07
"""
count = 0
for x in range(1, 5):
    for y in range(1, 5):
        for z in range(1, 5):
            if x != y and y != z and z != x:
             print(f"{x}{y}{z}", end=' ')
             count += 1
print("\n共{}种组合".format(count))